home *** CD-ROM | disk | FTP | other *** search
/ Gold Medal Software 3 / Gold Medal Software - Volume 3 (Gold Medal) (1994).iso / prog / sch110a.arj / GENERAL.DOC < prev    next >
Text File  |  1993-11-21  |  25KB  |  567 lines

  1.                                 SCHOONER
  2.                          Version 1.10 Shareware
  3.                               User's Manual
  4.  
  5.  
  6.                          DISCLAIMER AND WARRANTY
  7.                              the small print
  8.  
  9.   We have  done the best  to make this  a great package,  it may not be
  10.   perfect for you. Test it  out. If you like it then register your copy
  11.   and pass on another copy.
  12.  
  13.        Users of SCHOONER must accept this disclaimer of warranty:
  14.  
  15.        The  program  is provided  "AS  IS" without warranty of any
  16.        kind,  either  expressed   or  implied, including  but  not
  17.        limited to  the implied warranties  of merchantability  and
  18.        fitness  for a particular   purpose. The entire risk as  to
  19.        the  quality and performance   of the program is with  you.
  20.        Should  the program  prove defective, you (and not Jonathan
  21.        Cook)  assume the  entire cost of all necessary  servicing,
  22.        repair or correction.
  23.  
  24.        Jonathan Cook does  not warrant that the function contained
  25.        in  the  program  will  meet your requirements or that  the
  26.        operation  of the  program  will be uninterrupted or  error
  27.        free.
  28.  
  29.        In  no  event will Jonathan  Cook  be liable to you for any
  30.        damages  including any  lost profits, lost savings or other
  31.        incidental or consequential  damages arising out of the use
  32.        or inability  to use such  program or for  any claim by any
  33.        other party.
  34.  
  35.  
  36.                          DEFINITION OF SHAREWARE
  37.  
  38.   Shareware distribution  gives users  a chance to  try software before
  39.   buying it. If you try  a Shareware program and continue using it, you
  40.   are expected  to register.  Individual programs differ  on details --
  41.   some request  registration while  others require  it, some  specify a
  42.   maximum trial  period. With  registration, you get  anything from the
  43.   simple right  to continue  using the  software to  an updated program
  44.   with printed manual.
  45.  
  46.   Copyright laws  apply to both Shareware  and commercial software, and
  47.   the  copyright  holder  retains  all  rights,  with  a  few  specific
  48.   exceptions  as  stated  below.  Shareware  authors  are  accomplished
  49.   programmers, just  like commercial  authors, and the  programs are of
  50.   comparable quality. (In  both cases, there are  good programs and bad
  51.   ones!)  The main  difference is  in the  method of  distribution. The
  52.   author  specifically grants  the  right  to copy  and  distribute the
  53.   software,  either to  all  and sundry  or  to a  specific  group. For
  54.   example, some authors  require written permission before a commercial
  55.   disk vendor may copy their Shareware.
  56.  
  57.   Shareware  is a  distribution  method, not  a  type of  software. You
  58.   should find  software that  suits your needs  and pocketbook, whether
  59.   it's commercial or Shareware. The Shareware system makes fitting your
  60.   needs easier,  because you  can try before  you buy.  And because the
  61.   overhead  is low,  prices are  low also.  Shareware has  the ultimate
  62.   money-back guarantee --  if you don't use  the product, you don't pay
  63.   for it.
  64.  
  65.   SCHOONER 1.10 is  a "shareware program" and  is provided at no charge
  66.   to the user for evaluation.  Feel free to share it with your friends,
  67.   but please do not give  it away altered or as part of another system.
  68.   The  essence  of "user-supported"  software  is  to  provide personal
  69.   computer users with quality  software without high prices, and yet to
  70.   provide  incentive  for   programmers  to  continue  to  develop  new
  71.   products.
  72.  
  73.   If you find this program  useful and find that you are using SCHOONER
  74.   and continue  to use  SCHOONER after  a reasonable  trial period, you
  75.   must make  a registration  payment of $39.95  to Jonathan  Cook.  The
  76.   $39.95 registration  fee will  license one  copy for  use on  any one
  77.   computer at any  one time.  You must  treat this software just like a
  78.   book.  An example is  that this software may be used by any number of
  79.   people and may be freely moved from one computer location to another,
  80.   so long as  there is no possibility of  it being used at one location
  81.   while it's  being used at another.  Just as a book  cannot be read by
  82.   two different persons at the same time.
  83.  
  84.   Commercial users of  SCHOONER must register and  pay for their copies
  85.   of  SCHOONER  within  30  days  of  first  use  or  their  license is
  86.   withdrawn.    Site-License arrangements  may  be  made  by contacting
  87.   Jonathan Cook.
  88.  
  89.   Anyone distributing SCHOONER for  any kind of remuneration must first
  90.   contact Jonathan  Cook at  the address below  for authorization. This
  91.   authorization   will  be   automatically   granted   to  distributors
  92.   recognized by the  (ASP) as adhering to  its guidelines for shareware
  93.   distributors,  and  such  distributors  may  begin  offering SCHOONER
  94.   immediately (However Jonathan Cook  must still be advised so that the
  95.   distributor  can  be  kept  up-to-date  with  the  latest  version of
  96.   SCHOONER.).
  97.  
  98.   You are encouraged  to pass a copy of  SCHOONER along to your friends
  99.   for evaluation.  Please encourage them to register their copy if they
  100.   find that they can use  it.  All registered users will receive a copy
  101.   of the latest version of the SCHOONER system.
  102.  
  103.   Note:  Clipper(r),  Dbase and  Foxbase  are  registered  names and/or
  104.   trademarks of  Computer Associates, Borland  and Microsoft. Any other
  105.   name references,  expressed or  implied, are  registered names and/or
  106.   trademarks of their respective developers/manufacturers.
  107.  
  108.  
  109.                               INTRODUCTION
  110.  
  111.   Schooner is  a powerful, full  featured database programming language
  112.   similar to other Xbase languages.
  113.  
  114.   The  Schooner development  environment  revolves around  the powerful
  115.   text editor.  From this  command center  you can  develop and control
  116.   your application.
  117.  
  118.   You can write source code, create reports, create and modify database
  119.   structures, manipulate data and  execute your code... All from within
  120.   the text editor.
  121.  
  122.   In addition,  when errors are  detected, they are  displayed in a red
  123.   box. Schooner then places the  cursor on the line where the error was
  124.   detected, even if  the error occurred in a  module other than the one
  125.   you were editing.
  126.  
  127.   Command  and function  help are  just a  keypress away.  All language
  128.   documentation is on-line and available with the F1 help key.
  129.  
  130.  
  131.                             Getting Started.
  132.  
  133.   Schooner is  very easy to use.  Simply copy the  Sch110.exe file to a
  134.   subdirectory and change to that subdirectory.
  135.  
  136.   Decompress the Schooner files by typing:
  137.  
  138.             sch110.exe
  139.  
  140.   All of the files will decompress and you are ready to go.
  141.  
  142.   To begin Schooner type:
  143.  
  144.             Schooner
  145.  
  146.   and press ENTER.
  147.  
  148.   The Schooner editor will appear.
  149.  
  150.   While the editor appears simple, it will reveal a great deal with the
  151.   F1 key.
  152.  
  153.   Press F1 and the help  screen for the editor will appear. This screen
  154.   details all of the commands available to the editor.
  155.  
  156.   You  can cut  and paste  blocks of  text, read  and write  files (and
  157.   blocks) to and from disk,  create and edit data files and even create
  158.   report templates with the report writer.
  159.  
  160.   Press the F2 key from the editor help screen and a list of all of the
  161.   commands and functions available to the language appear.
  162.  
  163.   Scroll through the list. A short description accompanies each command
  164.   or  function. Press  ENTER  on a  highlighted  line and  the complete
  165.   description for that command or function appears.
  166.  
  167.   Each description  contains the command or  function name, the syntax,
  168.   the  use,   a  parameter   description,  return   values,  a  general
  169.   description and an sample piece of code.
  170.  
  171.   Press ESC and  you will back out of the  help system the same way you
  172.   went in.
  173.  
  174.  
  175.                            Viewing an Example
  176.  
  177.   An entire demo application is available for your viewing pleasure.
  178.  
  179.   Press F8 and enter the file name:
  180.  
  181.             DMDEMO.PRG
  182.  
  183.   and press ENTER.
  184.  
  185.   The program  DMDEMO will appear  on the screen.  To experienced XBASE
  186.   programmers the code will immediately look familiar.
  187.  
  188.   Use the arrow  keys to scroll up and  down. When you are done viewing
  189.   the code, execute it. Press
  190.  
  191.                  Alt-R
  192.  
  193.   Schooner assumes  you want to  run the  code that is  loaded into the
  194.   editor. You will  note that the file  name has changed to DMDEMO.RUN.
  195.   In the blink of an eye the code has been saved and converted into the
  196.   RUN format for execution.
  197.  
  198.   In fact all programs  (.prg) are automatically saved and converted to
  199.   .run format whenever  you press Alt-R (or  CTRL-W). This assures that
  200.   your .prg and .run are in synch at all times.
  201.  
  202.   Play with  the demo. When done  press ESC from the  demo menu and you
  203.   will return  to the exact  location in  the editor at  which you left
  204.   when you pressed Alt-R.
  205.  
  206.   The various programs  that make up the  demo are an excellent example
  207.   of  Schooner code.  As  mentioned above,  if  you have  experience in
  208.   Dbase(r) Foxbase(r)  or Clipper(r) you  will recognize Schooner right
  209.   away.
  210.  
  211.  
  212.                          Programming in Schooner
  213.  
  214.   Schooner is a language  interpreter. All code that is written and run
  215.   is interpreted  line by line. Experience  shows that interpreters are
  216.   best for fast  development but slower in  execution of code. Compiled
  217.   software is fast in execution, but slow in development.
  218.  
  219.   Schooner attempts  to find a  good compromise to  this problem. Since
  220.   Schooner  is   a  function  interpreter  as   opposed  to  a  command
  221.   interpreter, there is  very little interpretation that actually takes
  222.   place. Thus Schooner runs faster than other interpreters of a similar
  223.   design.
  224.  
  225.   However, Schooner  goes one step  further. All Schooner  1.10 code is
  226.   Clipper(r)  Summer '87  compiler  compatible. That's  right,  you can
  227.   compile Schooner  code with Clipper(r). Schooner  provides all of the
  228.   advantages of an interpreted development environment and the speed of
  229.   compiled applications.
  230.  
  231.   Unfortunately,  due   to  licensing   issues,  we   cannot  sell  you
  232.   Clipper(r). We can however  provide you with the Schooner library and
  233.   full  instructions  on how  to  compile  your  applications.  See the
  234.   additional compiler documentation below.
  235.  
  236.  
  237.                        Writing your first program
  238.  
  239.   From a  blank editor screen  press F8  and enter a  new program name.
  240.   Call it 'TEST.prg' for this example and press ENTER.
  241.  
  242.   Type in the following lines of code. Press ENTER after each line.
  243.  
  244.      clearscrn()
  245.      superbox(00,00,24,79,.T.,"",.f.)
  246.      mvcount=0
  247.      do while mvcount<50
  248.        message('The counter is: '+alltrim(str(mvcount)),'OFF')
  249.        mvcount=mvcount+1
  250.      enddo
  251.      message('DONE!!!')
  252.      quit
  253.  
  254.   When you are  done press ALT-R. This will  save and convert your code
  255.   to .RUN format. Press ENTER to accept the program to run and watch it
  256.   go...
  257.  
  258.   This little program  simply displays a counter  on the screen. But it
  259.   does give  you a  good idea  of how simple  a Schooner  program is to
  260.   write and run.
  261.  
  262.   In order to understand the  code better, press F1 then F2 and look up
  263.   each command and function in the on-line help.
  264.  
  265.  
  266.                     Schooner Technical Specifications
  267.  
  268.   In  a nutshell,  Schooner has  virtually all  of the  capabilities of
  269.   Dbase III  plus(r) and  Clipper(r) Summer '87.  In addition, Schooner
  270.   supports a whole set of graphics functions not found in either of the
  271.   above languages.
  272.  
  273.   System Specifications:  IBM compatible  computers with  640k bytes of
  274.   RAM, hard  drive, one  floppy, DOS 5.0  (developed in  5.0 but should
  275.   work in  version 3.30  or higher)  and a  color monitor  for graphics
  276.   display.
  277.  
  278.   Field types:   Character........32K
  279.                  Numeric..........Max 19 bytes
  280.                  Date.............8 bytes
  281.                  Logical..........1 byte
  282.                  Memo.............Max 64k
  283.  
  284.   Indexing: Schooner supports indexing with the .NTX
  285.             extension.
  286.  
  287.   Arrays:   Single dimensional arrays. Any data type.
  288.             Arrays are declared with the PUBLIC command.
  289.  
  290.   Files:    Database........... .dbf
  291.             Memos.............. .dbt
  292.             Labels............. .lbl
  293.             Reports............ .frm
  294.             Program modules.... .prg
  295.             Run modules........ .run
  296.  
  297.   Procedures and  Functions: Schooner handles  procedures much the same
  298.   way as Dbase  III plus(r). Functions are  handled as described in the
  299.   on-line documentation.  Functions can  be included  in lines  of code
  300.   like any compiled functions  but they cannot pass parameters (this is
  301.   done by  declared public variables),  contain nested Schooner defined
  302.   functions or call other Schooner procedures.
  303.  
  304.   Work Areas:  Schooner supports  9 open  files (work  areas) and index
  305.   combinations but not  to exceed the number  of files declared to DOS.
  306.   Each data file  must reside in its own  work area and can be accessed
  307.   by alias name or the FSELECT() function.
  308.  
  309.   Public: All  variables in Schooner are  declared as public (available
  310.   to all  procedures and functions)  either automatically when assigned
  311.   (mvname='John') or with the  PUBLIC command. All variable names start
  312.   with the letters MV and can contain a maximum of 10 letters.
  313.  
  314.   Operations:
  315.  
  316.        Math:     + addition
  317.                  - subtraction
  318.                  * multiplication
  319.                  / division
  320.                  % modulus
  321.                  ^ raised powers
  322.                 **   "      "
  323.  
  324.        Order:    Operations are solved from left to right.
  325.                  Parentheses are solved first
  326.                  Exponentiation are solved second
  327.                  Multiplication and division are third
  328.                  Addition and subtraction are last
  329.  
  330.  
  331.        Relational:    < less than
  332.                       > greater than
  333.                       = equal
  334.                       <> not equal
  335.                       <= less than or equal
  336.                       >= greater than or equal
  337.                       $ contained within
  338.                       == exactly equal
  339.  
  340.        Logicals: .and.
  341.                  .or.
  342.                  .not.
  343.  
  344.        Strings:  + join two strings together
  345.                  - joins two strings together but trims any
  346.                    trailing spaces from the first.
  347.  
  348.  
  349.   Passing  DOS Variables  to Schooner  Applications:  You can  pass DOS
  350.   information  to Schooner  by declaring  a DOS  variable with  the SET
  351.   command.  Use  the  GETE()   function  within  Schooner  to  get  the
  352.   environment  variable from  DOS. Be  sure that  the DOS  variable you
  353.   reference in the GETE() function is upper case. See GETE().
  354.  
  355.  
  356.                             Memory Management
  357.  
  358.   You can manage the  use of memory with the following standard CLIPPER
  359.   DOS environment variable settings:
  360.  
  361.        Set CLIPPER=Vxxx;Rxxx;Fxxx;Sx;Exxx
  362.  
  363.   'V' controls  memory (in kbytes) used  for tracking memory variables.
  364.   If not defined  then 20% of available memory  is used (up to 44k) for
  365.   variables. Since  only 22 bytes  are used for  each variable, you can
  366.   provide more memory to the  rest of the system by declaring only that
  367.   which is really needed for variables to Schooner.
  368.  
  369.   'R'  controls the  RAM  used for  index  buffers (these  are internal
  370.   buffers and  not those declared  in your config.sys)  and the SHELL()
  371.   function. Unless  you are going  to SHELL()  to DOS, set  this to the
  372.   minimum 16K.
  373.  
  374.   'F' overrides the files setting in Config.sys (but cannot exceed it).
  375.   This can be helpful in managing the number of open files Schooner can
  376.   use.
  377.  
  378.   'S' can  help to  control snow  effects on  older monitors.  Set to 1
  379.   (one) will help eliminate snow.
  380.  
  381.   'E' controls the amount of  Expanded memory Schooner can use, up to a
  382.   maximum of 1  megabyte. When available, expanded  memory is only used
  383.   for index buffering. Out  of memory conditions created as a result of
  384.   the MS DOS 5.00 and 6.00 EMM386.sys NOEMS option can be eliminated by
  385.   setting E to 000.
  386.  
  387.   You do not need to declare the CLIPPER variable to DOS, Schooner will
  388.   simply use the defaults. However, in tight memory environments it can
  389.   help your applications manage memory better.
  390.  
  391.  
  392.                           Network Applications
  393.  
  394.   Schooner  should be  compatible with  most  local area  networks that
  395.   recognize the Clipper(r) method  of record and file locking. However,
  396.   we do  not have a  LAN of our  own to test  with and cannot guarantee
  397.   networking compatibility.
  398.  
  399.   In general, writing applications for networks is pretty easy. Observe
  400.   the following:
  401.  
  402.   Open 'shared', all files  that reside on servers that will be shared.
  403.   Open other  files (especially  those that reside  on the  node PC) as
  404.   exclusive.
  405.  
  406.   All shared files must use record or file locking in order to lock the
  407.   record or  file for  exclusive use by  the requesting  node. Only the
  408.   locking node can modify the record or file. Others, however, can read
  409.   the file.
  410.  
  411.   Be sure to  unlock the record or file  when done so others can access
  412.   the record or file.
  413.  
  414.   Reference the  NETERR() function when  performing network activities.
  415.   This can help you determine error conditions that might arise.
  416.  
  417.   It  is recommended  that  you use  record  locking for  virtually all
  418.   network activities. This  leaves the rest of  the file open for other
  419.   users to  access and provides  better speed as  more users access the
  420.   file.
  421.  
  422.   However, OPEN()  the file  exclusively for such  activities as FZAP()
  423.   which will delete and pack the whole file.
  424.  
  425.  
  426.                     Error Detection During Execution
  427.  
  428.   As mentioned above, errors are trapped at run time and displayed in a
  429.   red box on the screen. Error messages are standard Clipper(r) derived
  430.   messages with  hooks to  the development  environment that  point the
  431.   Schooner editor  back to the  line of code  that generated the error.
  432.   This allows  Schooner to  load the file  that contains  the error and
  433.   place the cursor on the line of code with the error.
  434.  
  435.   Error messages  generally describe  the error well.  However, not all
  436.   messages are  easy to trace.  For the most  part, error messages will
  437.   define the  function, the  internal (not Schooner)  line of offending
  438.   code and a description of the error.
  439.  
  440.   The function described  in the error message  will most likely be the
  441.   Schooner named function, but it may be an internal function. If it is
  442.   an  internal  function,  don't panic.  The  error  is  probably  in a
  443.   Schooner command  or variable declaration. Let  Schooner point you to
  444.   the line of Schooner code and fix the error.
  445.  
  446.   Though  rare, some  errors may  generate  a condition  where Schooner
  447.   cannot  point you  back  to the  line  of code.  These  are generally
  448.   database file errors that  corrupt the file handles used by Schooner.
  449.   This does not cause damage. It simply means you have to manually load
  450.   the source code file and find the error yourself.
  451.  
  452.   Even more  rare are those errors  which dump you  back to DOS. Again,
  453.   they rarely cause damage, but you will need to restart Schooner.
  454.  
  455.   Make liberal use of the  SETEXIT() function to allow you to break out
  456.   of infinite  loop conditions.  In emergencies use  the Alt-C command.
  457.   This will  kill almost  any situation and  return you  to DOS. Simply
  458.   restart Schooner to fix the problem.
  459.  
  460.   The following are some of the more common errors:
  461.  
  462.   Database Required: You attempted to access a non existent database.
  463.  
  464.   Lock Required:  You tried  to perform  a function  which required the
  465.   file or  record to be  locked. Use  the file exclusively  or lock the
  466.   file or record.
  467.  
  468.   Exclusive Required: Similar to above. Use the file exclusively.
  469.  
  470.   Field Numeric Overflow:  You tried to write  a number into a database
  471.   field  where the  size of  the number  is larger  than the  field can
  472.   handle.
  473.  
  474.   Index File Corrupted: You have a damaged index file. Reindex.
  475.  
  476.   Type Mismatch: You tried to join or work on two variables that are of
  477.   a different type.
  478.  
  479.   Subscript Range:  You tried  to use  an array  element that  does not
  480.   exist.  In  rare  situations this  message  may  appear  if  you have
  481.   unbalanced IF..ENDIF or DO WHILE..ENDDO constructs.
  482.  
  483.   Zero Divide: You tried to divide by 0.
  484.  
  485.   Run Error: Occurs when a SHELL() error condition arises.
  486.  
  487.   Open Errors: These can occur  when an error arises during a file open
  488.   attempt. A number  is included with the  error that describes the DOS
  489.   error type.  Refer to your DOS  manual for a  full description of the
  490.   error type.
  491.  
  492.   Print Errors: Generally occur  when the printer is off-line or out of
  493.   paper.
  494.  
  495.   Undefined Identifier:  You tried to  use a variable  that has not yet
  496.   been defined.  Use the  PUBLIC command  to define  it or  assign it a
  497.   value. This can also occur when an IF or DO WHILE statement  tries to
  498.   evaluate  an expression  with an  undefined  variable (EVEN  WHEN THE
  499.   STATEMENT IS NESTED WITHIN  A FALSE CONSTRUCT. This can occur because
  500.   all IF and DO WHILE structures are evaluated in order to maintain the
  501.   internal structure stacks).
  502.  
  503.   Not an Array: You tried to use an array element that does not exist.
  504.  
  505.   Missing External: Generally refers  to misspellings in your code that
  506.   refer to commands or functions.
  507.  
  508.   Internal Error: An ugly one. Could mean a corrupted index file.
  509.  
  510.   Disk Full: Just like it sounds.
  511.  
  512.   Multiple Error:  Several errors  have occurred at  once. Another ugly
  513.   one. You will probable get dumped back to DOS.
  514.  
  515.   Out of  Memory: You have run  out of memory.  Try modifying the above
  516.   listed memory  management variables to  open up some  more memory. In
  517.   particularly  large  applications, try  running  your  code  with the
  518.   SCHOONRT runtime module rather than directly from the editor. This is
  519.   a hassle, but opens up more memory.
  520.  
  521.  
  522.                        Compiling your Applications
  523.  
  524.   As mentioned before, Schooner  is code compatible with the Clipper(r)
  525.   Summer 87 compiler. While  we cannot supply you with the compiler and
  526.   Clipper(r) libraries,  we can provide you  with the Schooner specific
  527.   libraries and  instructions on  how to  easily compile  your Schooner
  528.   code.
  529.  
  530.   The tools you will need are:
  531.  
  532.        Schooner and your Schooner code.
  533.        The Clipper(r) compiler
  534.        The Clipper(r) and Extend libraries
  535.        The Schooner library
  536.        The Schooner Schgraph library (for graphics)
  537.        The Microsoft(r) 'C' 5.00 LLibca library (for graphics)
  538.        The Microsoft(r) 'C' 5.00 Graphics library (for graphics)
  539.  
  540.   You  will note  that  for  graphics applications  you  will  need the
  541.   additional 'C' libraries listed above. Unfortunately we cannot supply
  542.   these for licensing reasons.
  543.  
  544.   If you already have  the Clipper(r) tools described above and want to
  545.   take  advantage of  Schooner functions  (not  commands), they  can be
  546.   directly intermixed  with Clipper(r)  commands and  functions in your
  547.   Clipper(r) applications.
  548.  
  549.   In  addition, the  Schooner  graphics should  be  accessible (without
  550.   recompiling with the Microsoft(r) libraries described above) by using
  551.   one of  the many third  party memory overlay  functions available. In
  552.   theory (We  stress theory  as we have  not done  this ourselves), you
  553.   should  be  able  to overlay  the  SCHOONRT  runtime  module  and use
  554.   Schooner  code to  create  graphics applications  in  your Clipper(r)
  555.   applications.
  556.  
  557.   Note that  the overlay technique  described above is  not the same as
  558.   overlays  commonly  used   by  compilers  and  linkers.  The  overlay
  559.   described above  is just a  sophisticated RUN (or  Schooner SHELL() )
  560.   which unloads your application  and allows another application to run
  561.   in its place. When complete, the overlayed application is removed and
  562.   your original application is restored.
  563.  
  564.   To order the Schooner  specific libraries send a 39.95 check or money
  565.   order  made out  to  'Jonathan Cook'  to  the address  listed  in the
  566.   README.DOC file.
  567.